# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76ac76c>}
nname: 285
n 285(None)[from pygui import config
config.user_config['advanced']['demo_mode'] = True
config.user_config.save()
os.system('sleep 1; reboot;')
return None
]:
	i: 263(), 284()
	o: 

nname: 284
n 284(None)[]:
	i: 224(f)
	o: 285()

nname: 263
n 263(None)[os.system("cp -f '%s' /etc/params/demo.replay" % scenario)
]:
	i: 224(t)
	o: 285()

nname: 224
n 224(os.path.isfile(scenario))[scenario = os.path.join(prefix, 'scenario')
]:
	i: 185(), 223()
	o: 263(t), 284(f)

nname: 223
n 223(None)[]:
	i: 69(f)
	o: 224()

nname: 185
n 185(None)[import tarfile
tarfile.TarFile(medias_archive).extractall('/wymedia')
]:
	i: 69(t)
	o: 224()

nname: 69
n 69(os.path.isfile(medias_archive))[update_manager._update_check_failed.im_func.func_code = do_nothing.func_code
MessageWindow('Installing demo mode...\nWill auto-reboot.', button=None).show()
import os
prefix = os.path.join(obj['path'], 'demo_mode_pack')
medias_archive = os.path.join(prefix, 'media.tar')
]:
	i: 33(), 50()
	o: 185(t), 223(f)

nname: 50
n 50(None)[update_manager._update_check_start.im_func.func_code = do_nothing.func_code
]:
	i: 0(f)
	o: 69()

nname: 33
n 33(None)[update_manager.check_window.hide()
]:
	i: 0(t)
	o: 69()

nname: 0
n 0(update_manager.check_window is not None)[def do_nothing(*args):
	pass

update_manager = UpdateManager()
]:
	i: 
	o: 33(t), 50(f)

nname: 224
n 224(None)[scenario = os.path.join(prefix, 'scenario')
if os.path.isfile(scenario):
	os.system("cp -f '%s' /etc/params/demo.replay" % scenario)
from pygui import config
config.user_config['advanced']['demo_mode'] = True
config.user_config.save()
os.system('sleep 1; reboot;')
return None
]:
	i: 0()
	o: 

nname: 0
n 0(None)[def do_nothing(*args):
	pass

update_manager = UpdateManager()
if update_manager.check_window is not None:
	update_manager.check_window.hide()
else:
	update_manager._update_check_start.im_func.func_code = do_nothing.func_code
update_manager._update_check_failed.im_func.func_code = do_nothing.func_code
MessageWindow('Installing demo mode...\nWill auto-reboot.', button=None).show()
import os
prefix = os.path.join(obj['path'], 'demo_mode_pack')
medias_archive = os.path.join(prefix, 'media.tar')
if os.path.isfile(medias_archive):
	import tarfile
	tarfile.TarFile(medias_archive).extractall('/wymedia')
]:
	i: 
	o: 224()

nname: 0
n 0(None)[def do_nothing(*args):
	pass

update_manager = UpdateManager()
if update_manager.check_window is not None:
	update_manager.check_window.hide()
else:
	update_manager._update_check_start.im_func.func_code = do_nothing.func_code
update_manager._update_check_failed.im_func.func_code = do_nothing.func_code
MessageWindow('Installing demo mode...\nWill auto-reboot.', button=None).show()
import os
prefix = os.path.join(obj['path'], 'demo_mode_pack')
medias_archive = os.path.join(prefix, 'media.tar')
if os.path.isfile(medias_archive):
	import tarfile
	tarfile.TarFile(medias_archive).extractall('/wymedia')
scenario = os.path.join(prefix, 'scenario')
if os.path.isfile(scenario):
	os.system("cp -f '%s' /etc/params/demo.replay" % scenario)
from pygui import config
config.user_config['advanced']['demo_mode'] = True
config.user_config.save()
os.system('sleep 1; reboot;')
return None
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76a5ccc>}
nname: 0
n 0(None)[from __future__ import absolute_import
import os
from pygui.window import MessageWindow
from pygui.facilities.update import UpdateManager
def handle_demo(obj):
	def do_nothing(*args):
		pass

	update_manager = UpdateManager()
	if update_manager.check_window is not None:
		update_manager.check_window.hide()
	else:
		update_manager._update_check_start.im_func.func_code = do_nothing.func_code
	update_manager._update_check_failed.im_func.func_code = do_nothing.func_code
	MessageWindow('Installing demo mode...\nWill auto-reboot.', button=None).show()
	import os
	prefix = os.path.join(obj['path'], 'demo_mode_pack')
	medias_archive = os.path.join(prefix, 'media.tar')
	if os.path.isfile(medias_archive):
		import tarfile
		tarfile.TarFile(medias_archive).extractall('/wymedia')
	scenario = os.path.join(prefix, 'scenario')
	if os.path.isfile(scenario):
		os.system("cp -f '%s' /etc/params/demo.replay" % scenario)
	from pygui import config
	config.user_config['advanced']['demo_mode'] = True
	config.user_config.save()
	os.system('sleep 1; reboot;')
	return None

]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb769f80c>}
from __future__ import absolute_import
import os
from pygui.window import MessageWindow
from pygui.facilities.update import UpdateManager
def handle_demo(obj):
	def do_nothing(*args):
		pass

	update_manager = UpdateManager()
	if update_manager.check_window is not None:
		update_manager.check_window.hide()
	else:
		update_manager._update_check_start.im_func.func_code = do_nothing.func_code
	update_manager._update_check_failed.im_func.func_code = do_nothing.func_code
	MessageWindow('Installing demo mode...\nWill auto-reboot.', button=None).show()
	import os
	prefix = os.path.join(obj['path'], 'demo_mode_pack')
	medias_archive = os.path.join(prefix, 'media.tar')
	if os.path.isfile(medias_archive):
		import tarfile
		tarfile.TarFile(medias_archive).extractall('/wymedia')
	scenario = os.path.join(prefix, 'scenario')
	if os.path.isfile(scenario):
		os.system("cp -f '%s' /etc/params/demo.replay" % scenario)
	from pygui import config
	config.user_config['advanced']['demo_mode'] = True
	config.user_config.save()
	os.system('sleep 1; reboot;')
	return None

